Physics:PP/1/Software and Data Used in This Book

From HandWiki

Software used in this book

This book will use several software packages for the examples.

PyROOT/C++

Most of the examples in this book to illustrate the real-life algorithms used in particle physics will be based on the Python programming language interfaced with ROOT. Within the ROOT framework, it is called "PyROOT". It is typically installed by default when ROOT is installed. The Python programming language is an excellent choice for this book since the example codes are short and can easily fit to the pages of this book. In addition, Python is a modern programming language which is constantly gaining popularity among data scientists, and is easy to learn while being a very powerful.

When we discuss examples of this book, we often will mention PyROOT/C++ when Python examples call ROOT C++. The pyROOT code can be easily transformed to a C++ code, or CLING interpreter macros (CLING is an interactive C++ interpreter from the ROOT). Such examples are typically contain the following import statement:

import ROOT

or

from ROOT import TH1D

used to import a 1D histogram. Finally, when the code examples will be difficult to implement in the "Python" syntax, we will use the standard CLING interpreter from the ROOT.

Some examples will require external C++ libraries. We will use such libraries from the "first hands", i.e. from the original web sites and the authors, without any dedicated frameworks which are typically used by large PP experiments. We also show how to compile such examples.

Using platform-independent software

In addition to ROOT, examples can be processed using platform-neutral software that runs on Java virtual machine. The main advantage comes from the fact that advantage comes from the fact that the code snippets can easily run on Windows without complex installation.


Jas4pp program

Jas4pp project can also be used to execute analysis examples. The code examples will also use the Python syntax, so the "Pythonic" side of the code snippets will look almost exactly as in PyROOT, but they will employ a different set of libraries written in the Java programming language. This will open a large choice to use different high-level classes that are missing in ROOT.

Jas4pp can be used to execute to execute Python code using Jython, a Java implementation of the Python language. Jython code can easily be rewritten using the Java language or Apache Groovy. This is similar to PyROOT examples which can be converted to the C++ code when the code contains calls to ROOT C++ libraries.

DataMelt program

Another set of libraries that can be used come from the DataMelt project. Unlike Jas4pp project, DataMelt has significantly more extended sets of libraries that can be used beyond particle physics.

Data used in this book

Some examples will require data. In many cases we will show how to create pseudo-data, i.e. representative data sets to illustrate the concept of computations, without using external source of data. However, some examples will require realistic data sets similar to what are used in experiments. We will provide the URL links to such data.